package com.hiwan.system.util.excel;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.List;

public class ExportTest04 {  
    public static void main(String[] args) {  
        // 初始化数据  
        List<StudentVO> list = new ArrayList<StudentVO>();  
  
        StudentVO stu = new StudentVO();  
        //stu.setId(1);  
        stu.setName("李坤");  
        stu.setSex("男");  
        stu.setClazz("god");  
        stu.setCompany("天融信");  
        stu.setBirthday("2015-03-07");  
        list.add(stu);  
  
        StudentVO stu2 = new StudentVO();  
        //stu2.setId(2);  
        stu2.setName("曹贵生");  
        stu.setSex("女"); 
        stu.setClazz("godness");  
        stu2.setCompany("中银");  
        list.add(stu2);  
  
        StudentVO stu3 = new StudentVO();  
       // stu3.setId(3);  
        stu3.setName("李学宇");  
        stu.setSex("女"); 
        stu.setClazz("数千");  
        list.add(stu3);  
  
        FileOutputStream out = null;  
        try {  
            out = new FileOutputStream("C:\\Users\\Administrator\\Desktop\\success4.xls");  
        } catch (FileNotFoundException e) {  
            e.printStackTrace();  
        }  
        ExcelTools<StudentVO> util = new ExcelTools<StudentVO>(StudentVO.class);  
        util.exportExcel(list, "学生信息", 60000, out);  
        System.out.println("----执行完毕----------");  
    } 
}